/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.additional;

import com.sun.lwuit.Form;
import com.sun.lwuit.Label;
import com.sun.lwuit.TextArea;
import com.sun.lwuit.plaf.Border;
import view.FunctionMenu;
import view.ViewManager;

/**
 *
 * @author Kvest
 */
public class DefaultCreator extends Creator
{
    private TextArea text;

    public DefaultCreator(Form owner)
    {
        super(owner);
    }

    public void init()
    {
        text = new TextArea("", 1, 30);
        text.setAlignment(TextArea.LEFT);
        text.setEditable(false);
        text.setGrowByContent(true);
        
        if (ViewManager.getViewManager().getFunctionMenuType() == FunctionMenu.KIROVOGRAD_TYPE) {
            owner.setScrollable(false);
            text.setFocusable(false);
            
            text.getUnselectedStyle().setBorder(Border.createEmpty());
        }

        owner.addComponent(text);
    }

    public void setText(String value)
    {
         text.setText(value + "\n");
    }
}
